package com.danskin.wechat.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.danskin.wechat.entity.CategoryProduct;
import com.danskin.wechat.entity.ProductInfo;
import com.danskin.wechat.util.Page;

public interface ProductInfoDao {

	List<ProductInfo> listPageProductInfoList(Page page);

	void saveProductInfoModel(ProductInfo productInfo);

	void deleteProductInfo(String id);

	void updateProductInfo(ProductInfo productInfo);

	ProductInfo findProductInfobyId(String id);

	List<ProductInfo> queryProductInfoListApi(@Param("appId")String appId, @Param("name")String name);

	List<ProductInfo> listPageProductInfoMallList(Page page);

	//List<CategoryProduct> findCategoryProduct(@Param("mpId")int mpId);

	void saveProductInfoModelMall(ProductInfo productInfo);

	void updateProductInfoMall(ProductInfo productInfo);

	ProductInfo queryProductInfoListAPI(String appId, String openId);

	List<ProductInfo> findProductInfoListAPI(@Param("appId")String appId, @Param("openId")String openId);

	List<ProductInfo> listPageSearchProductInfoList(Page page);

	ProductInfo getProductInfoDetail(@Param("appId")String appId, @Param("openId")String openId, @Param("id")String id);

	List<ProductInfo> findProductInfoListType(@Param("appId")String appId, @Param("openId")String openId, @Param("type")String type);

	List<ProductInfo> queryProductInfoByModelId(@Param("listOrd")List<Integer> listOrd);

	List<ProductInfo> findProductInfoByModel(@Param("id")int id);

	List<ProductInfo> listPageQueryProductInfoClassify(Page page);

	List<ProductInfo> queryProductInfoHotList(@Param("appId")String appId, @Param("num")int num);

	List<ProductInfo> queryProductInfoBySku(@Param("sku")String sku,@Param("type")String type);

	void updateProductInfoStock(@Param("id")String id, @Param("num")String num);

	List<ProductInfo> queryProductInfoByModle(@Param("listId")List<Integer> listId);

	ProductInfo queryProductInfoDetailed(@Param("appId")String appId, @Param("id")String id);

	List<ProductInfo> queryProductInfoType(@Param("id")int id);

	List<ProductInfo> queryProductInfoBySort(@Param("sort")String sort, @Param("mpId")int mpId);

}
